package com.seadragon.app.dms;

import org.springframework.context.support.GenericXmlApplicationContext;

import com.seadragon.app.dms.model.Customer;
import com.seadragon.app.dms.service.CustomerService;

public class TxJtaTest {
	public static void main(String[] args) {

		GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
		ctx.load("classpath:dms-application-context-test.xml");
		ctx.refresh();
		
		CustomerService customerService = ctx.getBean("customerService", CustomerService.class);

		Customer customer = new Customer();
		customer.setFirstName("Jta");
		customer.setLastName("Manager");
		customerService.save(customer);
		System.out.println("Customer saved successfully");		
		
	}
}
